﻿// //  ********************************************************************************
// //  Copyright (C) 2016 Sebastian Kenter. All rights reserved.
// // 
// //  Name    : MultiServerEngine | ServerFramework | ServerTelegramHandler.cs
// //  Created : 2016 - 02 - 16 20:53
// //  Modified: 2016 - 02 - 20 12:33
// //  ********************************************************************************

using ExitGames.Logging;
using ServerFramework.Interfaces.Handler;
using ServerFramework.Interfaces.Server;
using ServerFramework.Interfaces.Telegram;
using TypeDefs;

namespace ServerFramework.Implementation.Handler
{
    public abstract class ServerTelegramHandler : ITelegramHandler<IServerPeer>
    {
        public ILogger Logger { get; }
        public abstract TelegramHandlerTypes HandlerType { get; }
        public abstract byte Code { get; }
        public abstract int? SubCode { get; }

        protected ServerTelegramHandler(ILogger logger)
        {
            Logger = logger;
        }

        public abstract bool HandleTelegram(ITelegram telegram, IServerPeer serverPeer);
    }
}
